function dydt=def_ode_func(t,y,G,P,k)
% def_ode_func: An ODE example to use in MADS toolbox
%
% SYNTAX:
%   dydt = def_ode_func(t,y,G,P,k)
%   Return value of dy/dt at time t and state y.
%   This routine demostrates how to define an ODE in MADS toolbox.
%   To simulate motions described by ODEs, you must define such a routine to describe the ODE.
%   Game object G, player object P and player index k are passed for reference.


%   Author: Hongbin Ma
%   Last updated: 2009-6-1 with MATLAB 6.5
%   Problems or suggestions? Email me: mathmhb[at]163.com

switch length(P.pos)
case 2
% y[1]=pos_x; y[2]=pos_y; y[3]=angle;
dydt = [y(2); (1-y(1)^2)*y(2)-y(1);0.1];
case 3

otherwise

end
